<template>
	<view>
		<view>
			<uni-segmented-control :current="current"  :values="['消息','通知']" @clickItem="onClickItem" />
		</view>
		<view class="content">
			<view v-if="current === 0"><text class="content-text">选项卡1的内容</text></view>
			<view v-if="current === 1"><text class="content-text">选项卡2的内容</text></view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
                current: 0
			}
		},
		onLoad() {

		},
		methods: {
            onClickItem(e) {
                if (this.current !== e.currentIndex) {
                    this.current = e.currentIndex
                }
            },
		}
	}
</script>

<style>
	
</style>
